package com.ruoyi.project.param.paeaParaSystem.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.text.Convert;
import com.ruoyi.project.param.paeaParaSystem.domain.PaeaParaSystem;
import com.ruoyi.project.param.paeaParaSystem.mapper.PaeaParaSystemMapper;
import com.ruoyi.project.param.paeaParaSystem.service.IPaeaParaSystemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 文档服务器信息Service业务层处理
 *
 * @author 关晓强
 * @date 2020-03-14
 */
@Service
public class PaeaParaSystemServiceImpl extends ServiceImpl<PaeaParaSystemMapper, PaeaParaSystem> implements IPaeaParaSystemService
{
    @Autowired
    private PaeaParaSystemMapper paeaParaSystemMapper;

    /**
     * 查询文档服务器信息
     *
     * @param id 文档服务器信息ID
     * @return 文档服务器信息
     */
    @Override
    public PaeaParaSystem selectPaeaParaSystemById(String id)
    {
        return paeaParaSystemMapper.selectPaeaParaSystemById(id);
    }

    /**
     * 查询文档服务器信息列表
     *
     * @param paeaParaSystem 文档服务器信息
     * @return 文档服务器信息
     */
    @Override
    public List<PaeaParaSystem> selectPaeaParaSystemList(PaeaParaSystem paeaParaSystem)
    {
        return paeaParaSystemMapper.selectPaeaParaSystemList(paeaParaSystem);
    }

    /**
     * 新增文档服务器信息
     *
     * @param paeaParaSystem 文档服务器信息
     * @return 结果
     */
    @Override
    public int insertPaeaParaSystem(PaeaParaSystem paeaParaSystem)
    {
        paeaParaSystem.setCreateTime(DateUtils.getNowDate());
        return paeaParaSystemMapper.insertPaeaParaSystem(paeaParaSystem);
    }

    /**
     * 修改文档服务器信息
     *
     * @param paeaParaSystem 文档服务器信息
     * @return 结果
     */
    @Override
    public int updatePaeaParaSystem(PaeaParaSystem paeaParaSystem)
    {
        paeaParaSystem.setUpdateTime(DateUtils.getNowDate());
        return paeaParaSystemMapper.updatePaeaParaSystem(paeaParaSystem);
    }

    /**
     * 删除文档服务器信息对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deletePaeaParaSystemByIds(String ids)
    {
        return paeaParaSystemMapper.deletePaeaParaSystemByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除文档服务器信息信息
     *
     * @param id 文档服务器信息ID
     * @return 结果
     */
    @Override
    public int deletePaeaParaSystemById(String id)
    {
        return paeaParaSystemMapper.deletePaeaParaSystemById(id);
    }
}
